#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from django.urls import path, re_path
from rest_framework.routers import DefaultRouter
from . import views

app_name = "homework"

router = DefaultRouter()
router.register("course4", views.CourseModelViewSet, basename="course4")

urlpatterns = [
                  # API视图
                  path("course/", views.CourseApiView.as_view()),
                  re_path("^course/(?P<pk>\d+)/$", views.CourseInfoView.as_view()),
                  # 通用视图
                  path("courses/", views.CourseGenericApiView.as_view()),
                  re_path("^courses/(?P<pk>\d+)/$", views.CourseInfoGenericApiView.as_view()),

                  # 混合视图
                  path("courses3/", views.CourseMixinView.as_view()),
                  re_path("^courses3/(?P<pk>\d+)/$", views.CourseInfoMixinGenericApiView.as_view()),

              ] + router.urls
